package com.study.order.proxy.jdk;

/**
 * @author yuanqiji
 * @date 2022/08/16
 **/
public class JDKProxyTest {
	public static void main(String[] param) {
		Foo proxy0 = new $Proxy0((proxy, method, args) -> {
			//1,功能增强
			System.out.println("before......");
			Object invoke = method.invoke(new Target(), args);
			System.out.println("after......");
			return invoke;
		});
		proxy0.food();
		int bar = proxy0.bar();
		System.out.println(bar);
	}
}
